package com.tencreat.mapper.mall;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tencreat.domain.account.RechargeLimitChange;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 代采购额度设置Mapper接口
 *
 * @author tencreat
 * @company 深圳腾创互联科技有限公司
 * @link https://tencreat.com
 * @since 2023-11-15
 */
public interface RechargeLimitChangeMapper extends BaseMapper<RechargeLimitChange> {

    /**
     * 分页查询
     *
     * @param iPage               分页参数
     * @param rechargeLimitChange 查询条件
     * @return 分页结果
     */
    IPage<RechargeLimitChange> page(IPage<?> iPage, @Param("param") RechargeLimitChange rechargeLimitChange);

    BigDecimal changeByUser(Long uuid);

    BigDecimal rechargeLimitRecover(@Param("first") LocalDateTime first, @Param("end") LocalDateTime end, @Param("uuid") Long uuid);
}
